package org.jeecg.modules.haikrlk.job;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.haikrlk.entity.AgHaikrlk;
import org.jeecg.modules.haikrlk.service.IAgHaikrlkService;
import org.jeecg.modules.hkvs.HaikService;
import org.jeecg.modules.shangt.entity.ShangtUser;
import org.jeecg.modules.shangt.service.ShangTApiHelper;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import java.text.SimpleDateFormat;
import java.util.*;

@Slf4j
public class SyncFangkData implements Job {

    @Autowired
    IAgHaikrlkService agHaikrlkService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info(String.format("同步商汤访客数据，任务执行了，时间:" + DateUtils.formatDateTime()));
        long begin = System.currentTimeMillis();
        log.info("同步商汤开始时间---------------------------------------"+begin+"ms---------------------------------------");
        agHaikrlkService.haiktb("1");
        agHaikrlkService.haiktb("2");
        log.info("同步商汤结束时间-------------------------"+(System.currentTimeMillis() - begin) + "ms-------------------------------------------");

    }
}
